package com.ibeetl.admin.core.dao;

import com.ibeetl.admin.core.entity.Message;
import com.ibeetl.admin.core.web.query.MessageQuery;
import org.beetl.sql.core.annotatoin.Param;
import org.beetl.sql.core.annotatoin.SqlResource;
import org.beetl.sql.core.engine.PageQuery;
import org.beetl.sql.core.mapper.BaseMapper;

import java.util.List;

/**
 * Message Dao
 */
@SqlResource("core.message")
public interface MessageDao extends BaseMapper<Message>{
    PageQuery<Message> queryByCondition(PageQuery query);
    void batchDelMessageByIds(List<Long> ids);

    List<Message> getMessageList(MessageQuery messageQuery);

    void batchUpdatePersonMessageByIds(@Param("ids") List<Integer> ids);

    void batchUpdateCompanyMessageByIds(@Param("ids") List<Integer> ids);

    int countNotReadPersonMessage( MessageQuery messageQuery);

    int countNotReadCompanyMessage( MessageQuery messageQuery);
}